package com.jiangtai.training.ui.practice

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.jiangtai.training.R
import com.jiangtai.training.bean.NormalScore
import com.jiangtai.training.util.DateUtil

/**
 * Created by heCunCun on 2021/3/9
 */
class PracticeScoreAdapter:BaseQuickAdapter<NormalScore,BaseViewHolder>(R.layout.item_practice_score) {
    override fun convert(helper: BaseViewHolder, item: NormalScore?) {
        item?:return
        helper.setText(R.id.tv_task_name,item.projectName)
        helper.setText(R.id.tv_start_time,DateUtil.changeLongToDate(item.startTime!!))
        helper.setText(R.id.tv_end_time,DateUtil.changeLongToDate(item.uploadTime!!))
        if (item.score!=""){
            helper.setText(R.id.tv_score,item.score.toString())
        }else{
            helper.setText(R.id.tv_score,"训练中")
        }


    }
}